package com.sk.bilibili.other;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;

public class VideoDao extends SQLiteOpenHelper {

    public VideoDao(@Nullable Context context) {
        super(context, "bilibili", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL("create table danmu(id integer primary key autoincrement,member_id integer," +
                "color integer,video_id integer,content text,time real,type integer)");
        db.execSQL("create table video(id integer primary key autoincrement,video_set_id integer," +
                "cover text,path text,title text,see integer,size integer,danmu_num integer)");
    }



    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        Log.e("TEST","onUpgrade"+oldVersion+"->"+newVersion);
    }

}